<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>往期夺宝--一元夺宝</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<include file="public/comm" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav fs_xl">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">往期夺宝</h1>
		</header>
		<div class="mui-content fs_xl">
			<div class="wq_item">
				<ul>
					<foreach name="lists" item="vo" key="k">
					<li class="cls">
						<div class="wq_lt">
							<img src="{$vo[goods_id]|goods_thum_images=400,400}" />
						</div>
						<div class="wq_rt">
							<p class="yg_tit fs_l">{$vo.title}</p>
							<p class="list_time fs_m"><span class="li_d">00</span>天<span class="li_h">00</span>时<span class="li_m">00</span>分</p>
							<div class="db_jdt fs_xl">
								<span class="span_1 fs_xs">总共<em class="zs_num">{$vo.goods_num}</em>还剩<em class="sy_num">{$vo.stock_num}</em>夺宝</span>
								<span class="span_2"><em></em></span>
							</div>
							<div class="db_lj_btn">
								<a class="fs_m xq" href="#{:U('Mobile/Goods/indianaInfo',array('id'=>$vo.id))}" data-id="{$vo.id}">查看详情</a>
								<a class="fs_m cjjl" href="javascript:;" data-id="{$vo.id}" data-time="{$vo.start_time|date='Y-m-d',###}">参与记录</a>
							</div>
						</div>
					</li>
					</foreach>
				</ul>
			</div>
			<div class="cy_tc">
				<div class="cy_tc_m">
					<div class="one_item cyjl">
						<div class="cyjl_top">
							<p class="fs_s db_item">第333期参与记录</p>
							<p class="fs_s db_addtime">2017-5-4</p>
						</div>
						<div class="cy_list" style="padding: 0 0.6em;">
							<ul>
							
							</ul>
						</div>
					</div>
				</div>
				<div class="tc_close1">
					<i class="mui-icon mui-icon-closeempty fs_xxi"></i>
				</div>
			</div>
			<div class="wq_tc">
				<div class="wq_tc_m cls">
					<div class="tc_lt"><img src="__STATIC__/images/ss_2.png" /></div>
					<div class="tc_rt">
						<p class="tc_tit">今世缘54°金装古韵收藏美酒啊一瓶</p>
						<p class="yg_pri fs_xs"><span>¥<em class="fs_xxi">1</em></span><span class="shop_price">¥234</span></p>
						<p class="zj_id fs_m">中奖ID:<span class="nickname">忘记时间的钟</span></p>
						<p class="zj_xym fs_m">幸运码:<span>845435678421</span></p>
						<p class="zj_time fs_xs">2017-5-19</p>
					</div>
					<div class="tc_close">
						<i class="mui-icon mui-icon-closeempty fs_xxi"></i>
					</div>
					<div class="tc_sx"></div>
				</div>
			</div>
			<div class="db_nav fs_xl">
				<a class="fs_m" href="{:U('Mobile/Goods/indianaList')}">
					<p class="mui-icon iconfont icon-yiun fs_i"></p>
					<p class="fs_xs">一元夺宝</p>
				</a>
				<a class="fs_m" href="{:U('Mobile/Goods/indianaAfter')}">
					<p class="mui-icon iconfont icon-yuanun fs_i"></p>
					<p class="fs_xs">夺宝预告</p>
				</a>
				<a class="active fs_m" href="{:U('Mobile/Goods/indianaBefore')}">
					<p class="mui-icon iconfont icon-duoun fs_i"></p>
					<p class="active fs_xs">往期夺宝</p>
				</a>
				<a href="{:U('Mobile/User/indiana')}">
					<p class="mui-icon iconfont icon-baoun fs_i"></p>
					<p class="fs_xs">我的夺宝</p>
				</a>
			</div>
		</div>
		<script type="text/javascript">
			mui.init();
			$(function(){
				$(".cjjl").click(function(){
					var id = $(this).attr('data-id');
					var db_addtime = $(this).attr('data-time');
					$.post("{:U('Mobile/Goods/ajaxIndianaUser')}",{'id':id},function(data){
						if(data.status == 1){
						    $.each(data.data,function(i,data){
//						        $(".cy_img img").attr('src',data.head_pic);
//								$(".cy_name").text(data.nickname);
								$(".cy_tc").show();
//								$(".cy_cs").text(data.add_time);
								$(".cy_list ul").append('<li class="cls">'+'<div class="cy_img">'+'<img src="'+data.head_pic+'" />'+'</div>'+
								'<div class="cy_info">'+'<p class="fs_s cy_name">'+data.nickname+'<em class="cy_ph">'+data.mobile+'</em>'+'</p>'+
								'<p class="fs_s">夺宝'+'<i class="cy_cs">'+data.num+'</i>次'+'<em class="cy_time">'+data.add_time+'</em>'+'</p>'+
								'</div>'+'</li>');
						    });
							$(".cy_ph").each(function(){
								var　srr=$(this).text();
								var srrr=srr.substring(0,3)+"****"+srr.substring(7,11);
								$(this).text(srrr);
							});	
							$(".db_item").text("第"+id+"期参与记录");
							$(".db_addtime").text(db_addtime);
						}
						else{
							layer.alert(data.msg,2);
						}
					},'json');		
				})
				$(".db_lj_btn .xq").click(function(){
					var id = $(this).attr('data-id');
					$.post("{:U('Mobile/Goods/ajaxIndianaInfo')}",{'id':id},function(data){
						if(data.status == 1){
							$(".tc_lt img").attr('src',data.data.original_img);
							$(".tc_tit").text(data.data.goods_name);
							$(".yg_pri em").text(data.data.price);
							$(".shop_price").text('￥'+data.data.shop_price);
							$(".nickname").text(data.data.nickname);
							$(".zj_xym").text(data.data.indiana_number);
							$(".wq_tc").show();
							$(".wq_tc_m").show();
							$(".zj_time").text(data.data.win_time);
							var marH=($(".wq_tc").height()-$(".wq_tc_m").height())/2;
							$(".wq_tc_m").css("margin-top",marH);
						}
						else{
							layer.alert(data.msg,2);
						}
					},'json');					
				});
				$(".tc_close").click(function(){
					$(this).parents(".wq_tc").hide();
					
				});
				$(".tc_close1").click(function(){
					$(this).parents(".cy_tc").hide();
					
				});
				$(".db_jdt").each(function(){
      				var sy_num=$(this).find(".sy_num").text();
      				var zs_num=$(this).find(".zs_num").text();
      				var merc=Math.round((zs_num-sy_num)/zs_num * 10000) / 100.00 + "%";
      				$(this).find(".span_2 em").width(merc);
      			});//遍历页面进度条宽度
			})
		</script>
	</body>

</html>